<?php

$functions = array(
	'local_moodlin8_get_assignments' => array(
		'classname'	=> 'local_moodlin8_external',
		'methodname'	=> 'get_assignments',
		'classpath'	=> 'local/moodlin8/externallib.php',
		'description'	=> 'Get assignments with grades',
		'type'		=> 'read',
	),
        'local_moodlin8_get_files' => array(
                'classname'     => 'local_moodlin8_external',
                'methodname'    => 'get_files',
                'classpath'     => 'local/moodlin8/externallib.php',
                'description'   => 'Get user private files',
                'type'          => 'read',
        ),
	'local_moodlin8_upload_file' => array(
		'classname'	=> 'local_moodlin8_external',
		'methodname'	=> 'upload_file',
		'classpath'	=> 'local/moodlin8/externallib.php',
                'description'   => 'Upload a file to user private files',
                'type'          => 'write',
	),
        'local_moodlin8_download_file' => array(
                'classname'     => 'local_moodlin8_external',
                'methodname'    => 'download_file',
                'classpath'     => 'local/moodlin8/externallib.php',
                'description'   => 'Download a file from user private files',
                'type'          => 'read',
        ),
        'local_moodlin8_get_messages' => array(
                'classname'     => 'local_moodlin8_external',
                'methodname'    => 'get_messages',
                'classpath'     => 'local/moodlin8/externallib.php',
                'description'   => 'Get user received messages',
                'type'          => 'read',
        ),
	'local_moodlin8_get_contacts' => array(
		'classname'     => 'local_moodlin8_external',
                'methodname'    => 'get_contacts',
                'classpath'     => 'local/moodlin8/externallib.php',
                'description'   => 'Get users',
                'type'          => 'read',
	),
        'local_moodlin8_get_conversation' => array(
                'classname'     => 'local_moodlin8_external',
                'methodname'    => 'get_conversation',
                'classpath'     => 'local/moodlin8/externallib.php',
                'description'   => 'Get conversation with a user',
                'type'          => 'read',
        ),
        'local_moodlin8_get_events' => array(
                'classname'     => 'local_moodlin8_external',
                'methodname'    => 'get_events',
                'classpath'     => 'local/moodlin8/externallib.php',
                'description'   => 'Get user events',
                'type'          => 'read',
        ),
);

$services = array(
	'Moodlin8 services' => array(
		'functions' => array('core_course_get_courses', 'core_enrol_get_users_courses', 'core_course_get_contents', 'core_enrol_get_enrolled_users', 'core_webservice_get_site_info', 'core_user_get_users_by_id', 'core_message_send_instant_messages', 'local_moodlin8_get_assignments', 'local_moodlin8_get_files', 'local_moodlin8_upload_file', 'local_moodlin8_download_file', 'local_moodlin8_get_messages', 'local_moodlin8_get_contacts', 'local_moodlin8_get_conversation', 'local_moodlin8_get_events',),
		'restrictedusers' => 0,
		'enabled' => 1,
		'shortname' => 'moodlin8',
	),
);
